package com.songlanyun.modules.cnarea.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 行政区域
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-13 22:33:46
 */
@Data
@TableName("sys_cn_area_hn")
public class CnAreaHN implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Long id;
	/**
	 *	行政区域编码
	 */
	private Long aid;
	/**
	 * 行政区域名称
	 */
	private String area_name;
	/**
	 * 上级行政区域编码
	 */
	private Long pid;
	/**
	 * 级别
	 */
	private Long level;


	@TableField(exist = false)
	private List<CnAreaHN> children;

	public CnAreaHN(){
	}

	public final static CnAreaHN CN = new CnAreaHN(0L,"中国",100000L,0L);

	public CnAreaHN(Long aid, String area_name, Long pid, Long level) {
		this.aid = aid;
		this.area_name = area_name;
		this.pid =pid;
		this.level = level;
	}

}
